using System.Collections;
using System.Collections.Generic;
using UnityEditor;
using UnityEngine;

namespace EditorExtension
{
    // 为 GameObject 添加自定义预览窗口
    [CustomPreview(typeof(GameObject))]
    public class ObjectPreviewExample : ObjectPreview
    {
        // 有预览窗口
        public override bool HasPreviewGUI()
        {
            return true;
        }

        public override void OnPreviewGUI(Rect r, GUIStyle background)
        {
            GUI.Label(r, $"{target.name}， 预览了！");
        }
    }
}

